using Microsoft.EntityFrameworkCore;
using mvc.Models;
namespace mvc.Db
{
    public class AspNetCoreMvcDb : DbContext
    {
        private readonly string _constr = "uid=sa;pwd=123456;server=.;database=MyData";
        public DbSet<Product> product { get; set; }
        public DbSet<Category> category { get; set; }
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder){
            optionsBuilder.UseSqlServer(_constr);
        }
    }
}
